package com.jeecms.cms.dao.assist.impl;

import org.springframework.stereotype.Repository;

import com.jeecms.cms.dao.assist.CmsOrderExtDao;
import com.jeecms.cms.entity.assist.CmsOrderExt;
import com.jeecms.common.hibernate3.HibernateBaseDao;

@Repository
public class CmsOrderExtDaoImpl extends
		HibernateBaseDao<CmsOrderExt, Integer> implements
		CmsOrderExtDao {

	public CmsOrderExt findById(Integer id) {
		CmsOrderExt entity = get(id);
		return entity;
	}

	public CmsOrderExt save(CmsOrderExt bean) {
		getSession().save(bean);
		return bean;
	}

	public CmsOrderExt deleteById(Integer id) {
		CmsOrderExt entity = super.get(id);
		if (entity != null) {
			getSession().delete(entity);
		}
		return entity;
	}

	@Override
	protected Class<CmsOrderExt> getEntityClass() {
		return CmsOrderExt.class;
	}
}